import {createRouter, createWebHistory} from 'vue-router'
import MarkdownItRender from "@/components/MarkdownItRender";
import Home from "@/views/Home";
import NotFound from "@/views/NotFound";
import Write from "@/views/Write";
import VditorRender from "@/components/VditorRender";
import HomePage from "@/views/HomePage";

const routes = [
    {
        path: '/', component: Home,
        children: [
            {path: '', component: HomePage},
            {path: '/write', component: Write},
        ]
    },
    {path: '/render', component: MarkdownItRender},
    {path: '/render/vditor', component: VditorRender},
    {path: '/:pathMatch(.*)*', name: "NotFound", component: NotFound},
]

const router = createRouter({
    history: createWebHistory(),
    routes,
})

export default router